﻿#ifndef FORMTCPFILECLIENT_H
#define FORMTCPFILECLIENT_H


#include <QTimer>
#include <QWidget>

#include <Tool/tcpFileclient.h>

namespace Ui {
class FormTcpFileClient;
}

class FormTcpFileClient : public QWidget
{
    Q_OBJECT

public:
    explicit FormTcpFileClient(QWidget *parent = nullptr);
    ~FormTcpFileClient();
    void sendCommand(MsgType type,const QString& strinfo="");
    void SendInit();
    void on_pushButton_connect_clicked();

    void on_pushButton_disconnect_clicked();

    void on_pushButton_select_clicked();
    void OnLogMsg(const QString& logmsg);
    void on_pushButton_send_clicked();

    void HandleTimer();
    void connectAllSlots();

    void SetTCPServerInfo(const QString& strIP,const QString& strPort);
private slots:

protected:
     void closeEvent(QCloseEvent*event)override;
private:
    QTimer _timer;
    TcpFileClient _tcpClient;
    int _count=0;
    QString _strIP;
    int _Port;
private:
    Ui::FormTcpFileClient *ui;
};

#endif // FORMTCPFILECLIENT_H
